package com.字节流读数据FileInPutStream;

import lombok.SneakyThrows;

import java.io.FileInputStream;
/*
读数据 一个一个读取
优化 通过循环来实现
 */
public class Demo02 {
    @SneakyThrows
    public static void main(String[] args) {
        FileInputStream fileInputStream = new FileInputStream("java.txt");


        int bytes;
        while ((bytes=fileInputStream.read())!=-1){
            System.out.print((char)bytes);
        }
    }
}
